<xs:schema version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:gml="${GML_NAMESPACE}"
           xmlns:st="http://www.stations_${GML_PREFIX}.org/1.0"
           xmlns:ms="http://www.measurements_${GML_PREFIX}.org/1.0"
           targetNamespace="http://www.stations_${GML_PREFIX}.org/1.0"
           elementFormDefault="qualified" attributeFormDefault="unqualified">

  <xs:import namespace="${GML_NAMESPACE}" schemaLocation="${GML_LOCATION}"/>
  <xs:import namespace="http://www.measurements_${GML_PREFIX}.org/1.0" schemaLocation="measurements_${GML_PREFIX}.xsd"/>

  <xs:complexType name="StationType">
    <xs:complexContent>
      <xs:extension base="gml:AbstractFeatureType">
        <xs:sequence>
          <xs:element name="name" type="string"/>
          <xs:element name="location" type="st:Location"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="StationWithMeasurementsType">
    <xs:complexContent>
      <xs:extension base="gml:AbstractFeatureType">
        <xs:sequence>
          <xs:element name="name" type="string"/>
          <xs:element name="location" type="st:Location"/>
          <xs:element name="measurements" type="ms:MeasurementPropertyType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Location">
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="position" type="gml:GeometryPropertyType"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="Station_${GML_PREFIX}" type="st:StationType" substitutionGroup="gml:AbstractFeature"/>
  <xs:element name="StationWithMeasurements_${GML_PREFIX}" type="st:StationWithMeasurementsType" substitutionGroup="gml:AbstractFeature"/>

</xs:schema>
